/*
 * @Author: your name
 * @Date: 2020-12-12 00:24:26
 * @LastEditTime: 2020-12-17 11:10:03
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \12A-33组代码\src\api\account.js
 */
import server from '../../utils/fetch'
export const getAccount = () => {
    return server.get('/v1/account', {
        params: {
            userid: localStorage.getItem('patient_id')
        }
    })
}

export const getDAccount = () => {
    return server.get('/v1/account', {
        params: {
            userid: localStorage.getItem('doctor_id')
        }
    })
}
// 获取充值记录
export const getPurchaseHistory = () => {
    return server.get('/v1/purchasehistory', {
        params: {
            userid: localStorage.getItem('patient_id')
        }
    })
}
// 调用支付宝支付接口
export const alipay = (money) => {
    return server.post('/v1/purchasehistory', {
        money,
        params: {
            userid: localStorage.getItem('patient_id')
        }
    })
}
